<?php

class User_Widget_Browse_Profile_List extends Nuo_Widget
{

	function execute()
	{
		$mainResource = Nuo::getVar('mainResource');
		$viewer = Nuo::getUser();

		$userApi = Nuo::getApi('user');
		$resourceApi = Nuo::getApi('membership');
		$lists = $resourceApi -> getMemberLists($mainResource);

		return $this -> render(array(
			'lists' => $lists,
			'mutual' => $resourceApi -> getMutualMemberCount($mainResource, $viewer),
			'total' => $resourceApi -> getMemberCount($mainResource),
			'resource' => $mainResource,
			'count'=>count($lists),
			
		));
	}

}
